diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-11-02 20:02:24 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-11-02 20:02:24 -0400 |
| commit | 22ce0549e20ee397cf5953bd6b7aafc752deaa28 (patch) | |
| tree | 59e116cd0a198de04a2dbd3bbb632ec3dee6fed5 /ui/routes/(login)/invite/[invite]/+page.svelte | |
| parent | 0e14a3b7e365c05992848cfbc4b8d7d9681d6d04 (diff) | |
Run prettier, make lint part of pre-commit
Diffstat (limited to 'ui/routes/(login)/invite/[invite]/+page.svelte')
| -rw-r--r-- | ui/routes/(login)/invite/[invite]/+page.svelte | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/ui/routes/(login)/invite/[invite]/+page.svelte b/ui/routes/(login)/invite/[invite]/+page.svelte index 7ae388a..8f4d1a4 100644 --- a/ui/routes/(login)/invite/[invite]/+page.svelte +++ b/ui/routes/(login)/invite/[invite]/+page.svelte @@ -1,34 +1,35 @@ <script> - import { goto } from '$app/navigation'; - import { acceptInvite } from '$lib/apiServer'; + import { goto } from '$app/navigation'; + import { acceptInvite } from '$lib/apiServer'; - import LogIn from '$lib/components/LogIn.svelte'; + import LogIn from '$lib/components/LogIn.svelte'; - export let data; + export let data; - let username = "", password = ""; - let pending = false; - $: disabled = pending; + let username = '', + password = ''; + let pending = false; + $: disabled = pending; - async function onSubmit() { - pending = true; - const response = await acceptInvite(data.invite.id, username, password); - if (200 <= response.status && response.status < 300) { - username = ''; - password = ''; - goto('/'); - } - pending = false; - } + async function onSubmit() { + pending = true; + const response = await acceptInvite(data.invite.id, username, password); + if (200 <= response.status && response.status < 300) { + username = ''; + password = ''; + goto('/'); + } + pending = false; + } </script> {#await data} -<div class="card m-4 p-4"> - <p>Loading invitation…</p> -</div> + <div class="card m-4 p-4"> + <p>Loading invitation…</p> + </div> {:then { invite }} -<div class="card m-4 p-4"> - <p>Hi there! {invite.issuer} invites you to the conversation.</p> -</div> -<LogIn bind:disabled bind:username bind:password on:submit={onSubmit} /> + <div class="card m-4 p-4"> + <p>Hi there! {invite.issuer} invites you to the conversation.</p> + </div> + <LogIn bind:disabled bind:username bind:password on:submit={onSubmit} /> {/await} |
